<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.lmpop.trade.ts_category.Ts_categoryInfo" %>
 
<jsp:useBean id="randomId" class="com.lmpop.frame.util.RandomID" scope="page" />  
 
<%
 
 
 String attr_id = randomId.GenTradeId();
  
  Ts_categoryInfo ts_categoryInfo  = new Ts_categoryInfo ();
	
	String cat_id="";
	if (request.getParameter("cat_id") != null){
		cat_id = request.getParameter("cat_id");
	}
	
	String cat_name =ts_categoryInfo.getCatNameById(cat_id);
	String up_cat_id="";
	if (request.getParameter("up_cat_id") != null){
		up_cat_id = request.getParameter("up_cat_id");
	}


%> 
<html>
  <head>
    <title>ts_categoryattr Manager</title>
	  <link href="/program/admin/index/css/style.css" rel="stylesheet" type="text/css">
 
	  <script language="javascript" type="text/javascript" src="js_categoryattr.js"></script>
	  <script type="text/javascript" src="/program/admin/js/judgment.js" charset="UTF-8"></script>
</head>

<body>
	<h1>新增商品分类属性</h1>
                  
  <table width="100%" align="center" cellpadding="0" cellspacing="0" class="dl_so">
        <tr>
          <td width="9%" align="center"><img src="/program/admin/index/images/ban_01.gif" /></td>
          <td width="91%" align="left">
				  <h4>提示信息:</h4>
				  <span>当内容类型为单选框或多选框时必须输入属性值，为输入框时可以不输。</span>
          </td>
        </tr>
      </table>
	
	<form action="/doTradeReg.do" method="post" name="addForm">
	
	<table width="100%" cellpadding="1" cellspacing="1" border="0" class="listtab">
		
		<tr>
			<td align="right" width="20%">
				分类名称:
			</td>
			<td><%=cat_name%></td>
		</tr>
		
		
		
		<tr>
			<td align="right" width="20%">
				属性名称<font color="red">*</font>			
			</td>
			<td><input name="attr_name" id="attr_name" type="text" maxlength="100" onkeyup="inputNoHorns(this)"   onbeforepaste= "inputNoHorns(this); "/></td>
		</tr>
		
		<tr>
			<td align="right" width="20%">
				英文名称:
			</td>
			<td><input name="en_name" id="en_name" type="text" maxlength="100" onkeyup="inputNoHorns(this)"   onbeforepaste= "inputNoHorns(this); "/></td>
		</tr>
		
		
		<tr>
			<td align="right" width="20%">
				默认标识:
			</td>
			<td>
				<input name="default_tag" id="default_tag1" type="radio" value="0" />
必填	
				<input name="default_tag" id="default_tag2" type="radio" value="1" checked/>非必填	
						
			</td>
		</tr>
		
			<tr>
			<td align="right" width="20%">
				内容类型:
			</td>
			<td>
				<input name="con_type" id="con_type1" type="radio"  value="0" checked/>单选框 
				<input name="con_type" id="con_type2" type="radio"  value="1"/>输入框
        <input name="con_type" id="con_type3" type="radio"  value="2"/>多选框
				
				</td>
		</tr>

		
		<tr>
			<td align="right" width="20%">
				显示顺序:
			</td>
			<td><input name="attr_no" size="6" id="attr_no" type="text" onKeyUp="if(!/^[1-9][0-9]*$/.test(this.value))this.value=''" value="0" maxlength="4"/></td>
		</tr>

		
		
		<tr>
			<td align="right" width="20%">
				属性值<font color="red">*</font>				
				</td>
			<td>
				<input name="default_value" id="default_value" type="text" maxlength="100" onkeyup="inputNoHorns(this)"   onbeforepaste= "inputNoHorns(this); "/>
 
				<br/>
		    <font color="#666666">注：当内容类型为单选框或多选框时，属性值可用"|"号隔开！
 </font>
			</td>
		</tr>
		
		
		
	
		
	</table>
	
	<table width="100%" cellpadding="0" cellspacing="0" border="0">
		<tr>
			<td align="center">
				
				<input type="hidden" name="bpm_id" value="3026" />
 
				<input type="hidden" name="class_id" value="<%=cat_id%>" />
 
				<input type="hidden" name="attr_id" value="<%=attr_id%>" />
        <input type="hidden" name="enable_tag" value="0" />
				<input type="button"  class="buttoncss"  name="tradeSub" value="提交" onclick="subForm()"/>&nbsp;&nbsp;
				<input type="button"  class="buttoncss" name="tradeRut" value="返回" onclick="window.location.href='classAttr.jsp?cat_id=<%=cat_id%>&up_cat_id=<%=up_cat_id%>';"/>
			</td>
		</tr>
	</table>
	</form>
</body>

</html>
